The present invention relates to a method and apparatus of providing identification labels or the like for objects in virtual environments, and in particular to the generation of such labels for display.
One common technique for allowing a user to explore a three dimensional (3D) virtual environment is to provide the user with a two dimensional (2D) display xe2x80x98windowxe2x80x99 which gives the user a view into the environment.
While the virtual environment is stored in the form of data that expresses the environment in three dimensions, this data is processed to provide the user with a two dimensional view such that the user sees a representation of the three dimensional virtual environment as though from a particular viewpoint. As the user explores the environment this viewpoint changes. This process of projecting a 3D representation into a 2D view is sometimes referred to as rendering.
As a user navigates such a 3D environment various objects may be encountered. As the objects are encountered it is often desirable for information relating to the object to be revealed to the user, such as the identity of the object, supplementary information relating to the object or even information that is being fed back to the user as a result of his interaction with the object.
One known approach for providing such information to a user is to display the information in the form of a label which is united with the object as it exists in the 3D virtual environment. This approach has the advantage that the labels are in spatial registration with the object they are associated with, which can avoid confusion when more than one object appears in the view at a given time. Indeed, the Virtual Reality Modelling Language (VRML), as described, for example, in the VRML standard, version 2, issued as ISO/IEC WD 14772 on Aug. 4, 1996 allows for xe2x80x98text nodesxe2x80x99, which allow such textual labelling in the 3D environment/database. However, since these labels are native to the virtual world itself they can sometimes become difficult to read for a number of reasons.
The first problem occurs when the label is fixed with respect to the object. If an object is viewed from a perspective that is not directly front on, the text label will not be directly facing the viewpoint. As a result the text may be displayed as viewed from an angle such that the text is illegible through excessive skewing of the text characters or a masking of some text characters by other text characters. Should the object be viewed from behind, the text will be displayed from the rear which also makes it difficult to read. A second problem that can be encountered is that of aliasing; the effect of diagonal features of text characters assuming a xe2x80x98staircasexe2x80x99-like appearance due to discretisation of the texture map of the text label of the rendering process itself. Although this effect is tolerable when characters are viewed directly face on, the effect is exaggerated when the text is viewed at an angle which creates an unpleasant appearance and diminishes the legibility of the text. A third problem can occur when the virtual world is recreated on a display that operates in an interlaced mode, which is the mode used by a normal television display. This type of operation gives rise to an effect known as interlace flicker which is particularly noticeable at horizontal boundaries of displayed items, such as the top and bottom of text.
It is an object of the present invention to provide a method and apparatus supporting enhancement in the provision of labels associated with objects defined in a three dimensional virtual environment.
In accordance with a first aspect of the present invention there is provided a method of providing labels for objects defined in a three-dimensional (3D) virtual environment, the objects being presented on a two dimensional (2D) image plane through projecting those objects onto the 2D image plane in a rendering process, to generate an image that is representative of the 3D environment as observed from a viewpoint, said method comprising the steps of:
establishing a location for an object as presented in the 2D image plane and assigning an object position reference point relative thereto; and
generating a two dimensional (2D) label image which is associated with the object position reference point and movable therewith in two dimensions.
Because the label is generated as a two dimensional image rather than through a process of projecting a label from the 3D virtual environment, the label is always presented to directly face the user irrespective of the orientation of the object it is associated with as perceived from the users viewpoint. Such a generation method overcomes the above mentioned perspective issue which can lead to difficulty in displaying labels that are easy to read.
In a preferred implementation the two dimensional label images are generated in a two dimensional overlay plane which overlays the image plane containing the 3 dimensional rendered scene.
The method may further include the step of establishing the location of an object as presented in the 2D image plane through providing a bounding box sized to surround the associated object as defined in the 3D virtual environment, establishing the centre of the bounding box and projecting the location of the centre onto the 2D image plane in a rendering process to generate a position therein that is representative of the object location as observed from the viewpoint. Once such a position has been established, it is possible to provide an additional offset, such as a vertical offset to allow the label to be above the object, for example.
This step provides a consistent way of identifying the location of objects as they appear in the 2D image plane. The establishing technique is one that is suitable for being performed automatically without user intervention.
Preferably the two dimensional label images are generated with a size that is dependent on the distance of the associated object as defined within the virtual environment from the viewpoint. That is, objects that are distant with respect to the viewpoint are provided with associated labels generated with a smaller size and objects that are close with respect to the viewpoint are provided with associated labels generated with a larger size. In any case, some sort of visible difference may be provided for near and far labels such as scaling or shading of the text label colour.
Where a scaling parameter is employed in the process of projecting an object from the 3D virtual environment onto the 2D image plane, that scaling parameter may be employed in determining the size of a generated label associated with that object.
The label images may include text data.
Image data treatment may be applied to generated two dimensional label images. Such image data treatment may include standard image processing techniques such as anti aliasing and interlace flicker cancellation. The application of such treatment is generally more effective for labels generated in two dimensions than for labels projected from the 3D virtual environment. Furthermore, where the two dimensional images are generated in an overlay plane, it is possible to apply image treatment only to generated labels and not objects projected onto the 2D image plane simply by applying the treatment just to the overlay plane.
In accordance with a second aspect of the present invention there is provided data processing apparatus configured to generate labels for display with objects defined in a three-dimensional (3D) virtual environment, the objects being presentable on a two dimensional (2D) image plane through projecting those objects onto the 2D image plane in a rendering process, to produce an image that is representative of the 3D environment as observed from a viewpoint, the apparatus including:
object location means for establishing the location of an object as presented in the 2D image plane and assigning an object position reference point relative thereto; and
generating means for generating a two dimensional (2D) label image which is associated with the object position reference point and for moving the label image therewith in two dimensions.
Other aspects and optional features of the present invention appear in the appended claims, to which reference should now made and the disclosure of which is incorporated herein by reference.